package com.rr.mymoney.bo.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rr.mymoney.bo.CurrencyBo;
import com.rr.mymoney.dao.CurrencyDao;
import com.rr.mymoney.model.Currency;

@Service
public class CurrencyBoImpl implements CurrencyBo {

    private CurrencyDao currencyDao;

    @Autowired
    private CurrencyBoImpl(CurrencyDao currencyDao) {
	this.currencyDao = currencyDao;
    }

    public void saveOrUpdate(Currency currency) {
	currencyDao.saveOrUpdate(currency);
    }

    public Currency get(Long id) {
	return currencyDao.get(id);
    }

    public void delete(Currency currency) {
	currencyDao.delete(currency);
    }

    public List<Currency> getAll() {
	return currencyDao.getAll();
    }
}
